package com.xisoft.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xisoft.base.entity.BaseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * *
 * Created with Description:
 *
 * @version 1.0 <br>
 * @packagename: com.xisoft.abs<br>
 * @author: LiBencheng <br>
 * @computer: licheng <br>
 * @date: Created on 2022/7/19 9:54 <br>
 */
@Mapper
public interface XfBaseMapper< VO extends BaseVO > extends BaseMapper< VO >
{
    @Select ("${dynSql}")
    List< Map< String,Object > > getObjList(@Param ("dynSql") String dynSql);

    @Select ("SELECT reference FROM sys_dic_table_field WHERE lower(sdt_table_en_name)=#{table} "
            + "and lower(sdf_field_en_name)=#{field}")
    List< Map< String,Object > > getObjField(@Param ("table") String table, @Param ("field") String field);

    @Select ("SELECT reference FROM sys_dic_table_field WHERE lower(sdt_table_en_name)=#{table} "
            + "and lower(sdf_field_en_name)=#{field}")
    Map< String,Object > getField(@Param ("table") String table, @Param ("field") String field);

}
